home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / suplib / findname.c < prev    next >
C/C++ Source or Header  |  1992-10-25  |  306b  |  17 lines

  1.  
  2. #include <stdio.h>
  3. #include <suplib/lists.h>
  4.  
  5. void *
  6. FindName(struct List *list, const char *name)
  7. {
  8.     struct Node *node;
  9.  
  10.     for (node = list->lh_Head; node->ln_Succ; node = node->ln_Succ) {
  11.     if (node->ln_Name && strcmp(node->ln_Name, name) == 0)
  12.         return((void *)node);
  13.     }
  14.     return(NULL);
  15. }
  16.  
  17.